package cn.com.cifi.mars.web.action.sync;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.com.cifi.mars.common.constants.VersionConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@Api(tags = "ESB_Sync")
@RequestMapping("/${spring.data.rest.base-path}/{apiVersion}/esbSync")
public interface IEsbController {

    @ApiOperation(value = "主数据-项目", notes = "总线-SMS-006-供销存-项目同步Rest接口")
    @PostMapping(value = "project")
    String project(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String projectInfo);
   
    @ApiOperation(value = "主数据-项目分期", notes = "总线-SMS-007-供销存-项目分期同步Rest接口")
    @PostMapping(value = "projectStages")
    String projectStages(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String projectStagesInfo);

    @ApiOperation(value = "主数据-组团楼栋关系", notes = "总线-SMS-008-供销存-组团楼栋同步Rest接口")
    @PostMapping(value = "group")
    String group(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String groupInfo);
    
    @ApiOperation(value = "主数据-项目合作方", notes = "总线-SMS-013-供销存-合作方同步Rest接口")
    @PostMapping(value = "partner")
    String partner(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String partnerInfo);
    
    @ApiOperation(value = "主数据-分期合作方", notes = "总线-SMS-015-供销存-分期合作方同步Rest接口")
    @PostMapping(value = "syncStagePartners")
    String syncStagePartners(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String data);
    
    @ApiOperation(value = "主数据-产品业态面积", notes = "总线-SMS-010-供销存-产品业态面积同步Rest接口")
    @PostMapping(value = "formatArea")
    String formatArea(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String formatAreaInfo);
    
    @ApiOperation(value = "主数据-楼栋业态面积", notes = "总线-SMS-011-供销存-楼栋业态面积同步Rest接口")
    @PostMapping(value = "buildFormatArea")
    String buildFormatArea(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String buildFormatAreaInfo);
    
    @ApiOperation(value = "全景计划-楼栋计划", notes = "总线-SMS-001-供销存-楼栋计划同步Rest接口")
    @PostMapping(value = "buildingPlan")
    String buildingPlan(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String buildingPlanInfo);
    
    @ApiOperation(value = "明源-房间面积", notes = "总线-SMS-012-供销存-房间面积同步Rest接口")
    @PostMapping(value = "rooms")
    String rooms(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String rooms);

    @ApiOperation(value = "明源-签约数据", notes = "总线-SMS-020-供销存-明源签约数据同步Rest接口")
    @PostMapping(value = "myContract")
    String contracts(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String data);

    @ApiOperation(value = "签约计划订阅", notes = "销售管理系统-签约计划")
    @PostMapping(value = "monthTradePlan")
    String monthTradePlan(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String signData);
  
    @ApiOperation(value = "全景计划-拿地时间(全景计划接口订阅)", notes = "全景计划-拿地时间(全景计划接口订阅)")
    @PostMapping(value = "panoramaPlan")
    String panoramaPlan(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String signData);

    @ApiOperation(value = "明源-校验是否允许明源做定调价", notes = "总线-SMS-017-供销存-校验定调价权限Rest接口")
    @PostMapping(value = "isAllowModify")
    String isAllowModify(
    		@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
    		@RequestBody String msg);
    
    @ApiOperation(value = "明源-定调价通知", notes = "总线-SMS-016-供销存-明源定调价通知Rest接口")
    @PostMapping(value = "modifyNotice")
    String modifyNotice(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
            @RequestBody String msg);
    
    @ApiOperation(value = "预算-预算季预算版本标识", notes = "总线-SMS-019-供销存-预算系统预算版本标识插入Rest接口")
    @PostMapping(value = "projectVersion")
    String projectVersion(
    		@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
    		@RequestBody String msg);
    
    @ApiOperation(value = "预算-预算季是否允许编制", notes = "总线-SMS-018-供销存-是否允许项目编制预算版本Rest接口")
    @PostMapping(value = "projectStatus")
    String projectStatus(
    		@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
    		@RequestBody String msg);
   
    @ApiOperation(value = "销管-查询项目货值审批核心指标数据", notes = "总线-SMS-021-供销存-项目货值审批核心指标数据查询Rest接口")
    @PostMapping(value = "queryPriceValue")
    String queryPriceValue( @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
    		@RequestBody String msg) ;
    
    
    //##############################################手动处理接口############################################################################################################################
    @ApiOperation(value = "下发签约计划接口（单个版本）", notes = "发布签约计划接口（手动接口）")
    @PostMapping(value = "publicSignPlan")
    public String publicSignPlan( @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
    		@ApiParam(value = "版本ID") @RequestParam(name = "versionId",required = true) String versionId) ;
    
    
    @ApiOperation(value = "下发签约计划接口（批量操作）", notes = "发布签约计划接口（手动接口）")
    @PostMapping(value = "publicSignPlanBatch")
    public String publicSignPlanBatch( @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
    		@ApiParam(value = "区域ID") @RequestParam(name = "regionId",required = false) String regionId,
    		@ApiParam(value = "项目ID") @RequestParam(name = "projectId",required = false) String projectId,
    		@ApiParam(value = "版本类型") @RequestParam(name = "versionType",required = false) String versionType) ;
    
    @ApiOperation(value = "下发通知取数", notes = "下发通知取数（手动接口）")
    @PostMapping(value = "informFetch")
    public String informFetch( @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
    		@ApiParam(value = "主数据项目ID") @RequestParam(name = "projectId",required = true) String projectId) ;
    
    
    @ApiOperation(value = "查询销管系统核心指标数据接口", notes = "查询销管系统核心指标数据接口（手动接口）")
    @PostMapping(value = "queryXGPriceValue")
    public String queryXGPriceValue( @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
    		@ApiParam(value = "方案ID") @RequestParam(name = "schemeId",required = true) String schemeId) ;
    
}
